import { View } from "../../../../mvc/core/View";
import { ObjCreate } from "../../common/ObjCreate";
import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
import { DisplayUtil } from "../../../../common/DisplayUtil";
type int = number;
//class MountEquipRoundProcess
    
    export  class MountEquipRoundProcess extends View
    {
        constructor()
        {
            super();
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            this._balckBm = ObjCreate.createBitmap("", 0, 0, this);
            this._shineBm = ObjCreate.createBitmap("", 0, 0, this);
            this._maskSp = new Object /* flash.display.Sprite */();
            addChild(this._maskSp);
            this._shineBm.mask = this._maskSp;
            LoaderHelp.addResCallBack(ResFileConst.mountEquip, this.onLoadBmResource);
            return;
        }

        /* internal  */onLoadBmResource(): void
        {
            this._balckBm.bitmapData = GlobalClass.getBitmapData(ImagesConst.mountEquip_roundBg);
            this._shineBm.bitmapData = GlobalClass.getBitmapData(ImagesConst.mountEquip_roundPro);
            return;
        }

        public setData(arg1: int, arg2: int): void
        {
            this._maskSp.graphics.clear();
            this._maskSp.graphics.beginFill(16711680);
            DisplayUtil.drawSector(this._maskSp.graphics, 75, 75, 75, this.getDrowSize(arg1, arg2));
            return;
        }

        /* internal  */getDrowSize(arg1: int, arg2: int): number
        {
            var loc1=arg1 * 360 / arg2;
            if (loc1) 
            {
                return loc1;
            }
            return 0;
        }

        /* internal */ /* var */_shineBm: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_maskSp: Object /* flash.display.Sprite */;

        /* internal */ /* var */_balckBm: Object /* flash.display.Bitmap */;
    }
